<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>{$is_language?'抵押':'ortgage'}</title>
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <link rel="stylesheet" href="__MODULE_LIBS__/css/weui.min.css">
    <link rel="stylesheet" href="__MODULE_LIBS__/css/jquery-weui.css">
    <link rel="stylesheet" href="__MODULE_LIBS__/css/demos.css">
    <script src="__MODULE_LIBS__/js/jquery-2.1.4.js"></script>
    <script src="__MODULE_LIBS__/js/fastclick.js"></script>
    <script src="__MODULE_LIBS__/js/jquery-weui.js"></script>
    <style type="text/css">
        * {
            margin: 0;
            padding: 0;
        }

        html {
            width: 100%;
            height: 100%;
            font-size: 20px;
            font-family: "Microsoft YaHei", "宋体", "Segoe UI", "Lucida Grande", Helvetica, Arial, sans-serif, FreeSans, Arimo;
            background: #F3F3F3;
        }

        body {
            margin: 0 auto;
            max-width: 750px;
            height: 100%;
            background: #F7F7F7;
        }

        /*顶部导航栏处的样式*/
        .navbar {
            position: relative;
            width: 100%;
            height: 2rem;
            font-size: 16px;
            color: #fff;
            line-height: 2rem;
            background: #373553;
        }

        .navbar-item {
            position: absolute;
            left: 0;
            top: 0;
            display: block;
            width: 3.2rem;
            height: 2rem;
            font-size: 14px;
            color: #fff;
            text-align: center;
        }

        .navbar-item > img {
            width: 0.8rem;
            height: 0.7rem;
            vertical-align: middle;
        }

        .navbar-center {
            text-align: center;
        }

        /*主体部分的样式*/
        .content {
            width: 100%;
            color: #fff;
        }
        .top_t {
            display: flex;
            align-items: center;
            justify-content: center;
            flex-direction: column;
            height: 100px;
            background-color: #FF5428;
        }
        .top_nav {
            display: flex;
            background-color: #FC5B2F;
        }
        .top_nav div {
            width: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-direction: column;
        }
        .foot {
            position: fixed;
            bottom: 0;
            display: flex;
            height: 50px;
            width: 100%;
            max-width: 750px;
        }
        .foot a {
            display: flex;
            width: 50%;
            align-items: center;
            justify-content: center;
        }
        .left {
            color: #2373FC;
            background-color: #fff;
        }
        .right {
            background-color: #2373FC;
            color: #fff;
        }
    </style>
</head>
<body>
<header class="navbar">
    <a href="{:url('index/index')}" class="navbar-item">
        <img src="__MODULE_LIBS__/img/back.png"/>&nbsp;{$is_language?'返回':'Return'}
    </a>
    <div class="navbar-center">{$is_language?'抵押':'ortgage'}</div>
    <div class="navbar-item1">
        <select name="" id="yy">
            <option value="1" {$is_language?'selected':''}>中文</option>
            <option value="0" {$is_language?'':'selected'}>English</option>
        </select>
    </div>
</header>
<div class="content">
    <div class="top">
        <div class="top_t">
            <span>{$is_language?'可出借積分':'Lending balance'}</span>
            <span>{$data['money']?$data['money']:0}</span>
        </div>
        <div class="top_nav">
            <div>
                <span>{$is_language?'已出借積分':'Lending amount'}</span>
                <span>{$data['mortgage_money']?$data['mortgage_money']:0}</span>
            </div>
            <div>
                <span>{$is_language?'累積收益':"Cumulative revenue"}</span>
                <span>{$data['mortgage_profit']}</span>
            </div>
        </div>
    </div>
    <div class="foot">
        <a class="left" href="{:url('mortgage/index')}">{$is_language?'抵押設置':'Mortgage setting'}</a>
        <a class="right" href="{:url('mortgage/record')}">{$is_language?'抵押詳情':'Mortgage records'}</a>
    </div>
</div>

<script type="text/javascript">
    $(document).on("change",'select#yy',function(){
        var yy = $(this).val();
        console.log(yy)
        var url = "{:url('index/language')}";
        $.post(url,{language:yy},function (res) {
            window.location.reload();
        })
    });
</script>
</body>
</html>
